package array.sliding_window;

/**
 * 乘积小于k的子数组的个数
 */
public class NumSubArrayProductLessThank {

    public int numSubarrayProductLessThanK(int[] nums, int k) {

        int left = 0, right = 0;
        // 滑动窗口，初始化为乘法单元
        int windowProduct = 1;
        // 记录符合条件的子数组个数
        int count = 0;

        while (right < nums.length) {
            // 扩大窗口，并更新窗口数据
            windowProduct = windowProduct * nums[right];
            right++;

            while (left < right && windowProduct >= k) {

            }
        }
        return count;
    }
}
